<template>
  <!--对菜品评分模块-->
  <div class="rate">
    <van-field name="rate" label="整体评分">
      <template #input>
        <van-rate v-model="value" />
      </template>
    </van-field>
  </div>
</template>

<script setup>
import { ref } from "vue";
import { Toast } from "vant";

const value = ref(3);
defineExpose({
  value,
});
const onChange = (value) => Toast("当前值:" + value);
</script>

<style>
.rate {
  position: relative;
  margin-top: 100px;
  left: 30px;
}
</style>



